#!/usr/bin/env python
Import('env')

if env.Dictionary()['PROGSUFFIX'] == '.exe':
    # Windows
    env.Append(LIBPATH=['/boost_1_42_0/stage/lib'])
    env.Append(CPPPATH=['/boost_1_42_0','../proto', 'C:/msys/1.0/local/include'])
    env.Append(CPPDEFINES=['_WIN32_WINDOWS=0x0501'])
    env.Append(LIBS=[
        'liblibboost_system-mgw34-mt', 
        'ws2_32',
        'libprotobuf',
        'libprotobuf-lite',
        'libprotoc'])
    #,'libprotobuf','libprotobuf-lite','libprotoc'
else:
    # POSIX
    env.Append(LIBPATH=['../../../boost_1_42_0/stage/lib'])
    env.Append(CPPPATH=['../../../boost_1_42_0', '../..', '../../proto'])
    env.Append(LIBS=['boost_system', 'libprotobuf'])

serversources = [
    '../../proto/database.pb.cc', 
    '../../proto/database.pb.h', 
    'daytime_server.cpp']

clientsources = [
    '../../proto/database.pb.cc', 
    '../../proto/database.pb.h', 
    'daytime_client.cpp']

prog1=env.Program(target='daytime_server', source=serversources)
Default(prog1)
prog2=env.Program(target='daytime_client',source=clientsources)
Default(prog2)

